package com.bawei.network

import com.blankj.utilcode.util.EncryptUtils
import java.util.*

/**
 * @author ZhangRuiPeng
 * @description:
 * 由于网络接口要求使用sign，所以在项目中添加sign加密工具类
 * 规则：请求参数拼接升序排序添加混淆字符串tamtoo Md5加密
 *
 *`
 */
class SignUtils {

    companion object{
        fun createSign(oldstr : String):String{
            if (oldstr.isEmpty())
                return ""
            var chars = oldstr.toCharArray()
            Arrays.sort(chars)
            var  str = String(chars)
            str += "tamboo"
            return EncryptUtils.encryptMD5ToString(str).toLowerCase()
        }
    }






































}